-
Couldn't load subscription status.
- Fork 20
CI cleanup fixes #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI cleanup fixes #1239
Conversation
Marenz
commented
Jun 24, 2025
- Set min numpy version to lowest prebuilt python3.13-compatible release
- ComponentTracker: Use run_forever with eventloop fixes for _run() loop
- Actor: Don't restart on RuntimeError:No Running Eventloop
- Use get_running_loop() instead of str cmp to check for a running event loop
- cancel_and_wait: Re-raise if it was our task
- Fix swallowing of cancel error in Formula Engine & Voltage streamer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR cleans up CI compatibility and refines event loop and cancellation handling across several components.
- Bump numpy to ≥2.1.0 for Python 3.13 compatibility
- Propagate
CancelledErrorinstead of breaking loops in FormulaEngine and VoltageStreamer - Centralize continuous retry loops via
run_foreverand prevent actor restarts when no running event loop - Improve
cancel_and_awaitto re-raise cancellation and abort on missing event loop
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frequenz/sdk/timeseries/formula_engine/_formula_engine.py | Replace break with raise for CancelledError propagation |
| src/frequenz/sdk/timeseries/_voltage_streamer.py | Replace break with raise for CancelledError propagation |
| src/frequenz/sdk/microgrid/_power_distributing/_component_status/_battery_status_tracker.py | Wrap the main loop in run_forever |
| src/frequenz/sdk/actor/_actor.py | Skip restart when no event loop is running |
| src/frequenz/sdk/_internal/_asyncio.py | Refine cancel_and_await, add is_loop_running, abort on missing loop |
| pyproject.toml | Update numpy dependency to >=2.1.0,<3 |
Comments suppressed due to low confidence (1)
src/frequenz/sdk/actor/_actor.py:109
- [nitpick] The new branch that skips restarts when no event loop is running should be covered by a unit or integration test to prevent regressions.
if not is_loop_running():
src/frequenz/sdk/microgrid/_power_distributing/_component_status/_battery_status_tracker.py
Show resolved
Hide resolved
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
…t loop Signed-off-by: Mathias L. Baumann <[email protected]>
Reraise the cancel error if it was our task that was cancelled. Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>